<template>
  <div>
    <div class="nav">
      <button @click="toPage(0)">处理用户反馈</button>&nbsp;
      <button @click="toPage(1)">管理员首页</button>&nbsp;
      <button @click="toPage(2)">统计信息</button>&nbsp;
      <button @click="toPage(3)">用户管理</button>&nbsp;
    </div>
    <router-view></router-view>  
  </div>
</template>

<script setup>
import { ref } from "vue";
import { useRouter, useRoute } from "vue-router";

import { get } from "@/common";

const router = useRouter();

const pathes = [
  "/admin_home/admin_feedback",
  "/admin_home/admin_index",
  "/admin_home/statistics",
  "/admin_home/user_management",
  
];

router.push({ path: "/admin_home/admin_index" });

const toPage = temp_index => {
  router.push({ path: pathes[temp_index] });
};
</script>

<style>
.nav {
  height: 50px;
  width: 100%;
  text-align: center;
  box-shadow: 0px 1px 5px 5px rgba(0, 0, 0, 0.05);
}
</style>